﻿// -----------------------------------------------------------------------------
// Generate By Furion Tools v4.8.5
// -----------------------------------------------------------------------------
using SqlSugar;
namespace Minotaur.App.Domains.Model.Field
{
    [SugarTable("FieldInfo")]
    public class FieldInfo : EntityBase
    {
        [SugarColumn(ColumnName = "autoid", IsIdentity = true, IsPrimaryKey = true)]
        public long AutoId { get; set; }

        /// <summary>
        /// 数据库表编码
        /// </summary>
        [SugarColumn(ColumnName = "tablecode")]
        public string TableCode { get; set; }

        /// <summary>
        /// 字段编码
        /// </summary>
        [SugarColumn(ColumnName = "fieldcode")]
        public string FieldCode { get; set; }

        /// <summary>
        /// 是否主键
        /// </summary>
        [SugarColumn(ColumnName = "isprimary")]
        public bool? IsPrimary { get; set; }

        /// <summary>
        /// 是否外键
        /// </summary>
        [SugarColumn(ColumnName = "isforeign")]
        public bool? IsForeign { get; set; }

        /// <summary>
        /// 关联主键表
        /// </summary>
        [SugarColumn(ColumnName = "foreigntable")]
        public string ForeignTable { get; set; }

        /// <summary>
        /// 关联主键表表字段
        /// </summary>
        [SugarColumn(ColumnName = "foreignkey")]
        public string ForeignKey { get; set; }

        /// <summary>
        /// 控件类型
        /// 直接输入、
        ///    常用参数、
        ///    人员、
        ///    组织、
        ///    职位、
        ///    权限
        /// </summary>
        [SugarColumn(ColumnName = "controlstype")]
        public string ControlsType { get; set; }


        /// <summary>
        /// 控件数据来源
        /// </summary>
        [SugarColumn(ColumnName = "controlsouces")]
        public string ControlSouces { get; set; }


        /// <summary>
        /// 字段类型
        /// </summary>
        [SugarColumn(ColumnName = "fieldtype")]
        public int? FieldType { get; set; }
        /// <summary>
        /// 选择类型
        /// </summary>
        [SugarColumn(ColumnName = "selecttype")]
        public int? SelectType { get; set; }

        /// <summary>
        /// 默认值
        /// </summary>
        [SugarColumn(ColumnName = "defaultvalue")]
        public string DefaultValue { get; set; }

        /// <summary>
        /// 字段长度
        /// </summary>
        [SugarColumn(ColumnName = "fieldlength")]
        public int? FieldLength { get; set; }

        /// <summary>
        /// 必填
        /// </summary>
        [SugarColumn(ColumnName = "isrequired")]
        public bool? IsRequired { get; set; }

        /// <summary>
        /// 是否内置字段
        /// </summary>
        [SugarColumn(ColumnName = "isinlay")]
        public bool? IsInlay { get; set; }

        /// <summary>
        /// 启用？
        /// </summary>
        [SugarColumn(ColumnName = "enable")]
        public bool? Enable { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(ColumnName = "havedelete")]
        public bool? HaveDelete { get; set; }

        /// <summary>
        /// 精度
        /// </summary>
        [SugarColumn(ColumnName = "precisions")]
        public int? Precisions { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        [SugarColumn(ColumnName = "sequence")]
        public long? Sequence { get; set; }

        /// <summary>
        /// 资源
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(FieldInfoRes.FieldId))]
        public virtual List<FieldInfoRes> Res { get; set; }

    }
}
